<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        function Clothes(name, color) {
            this.name = name;
            this.color = color;
        }
        Clothes.prototype.type = "衣服";

        Clothes.prototype.wr_clothe = function() {
            document.writeln("<br>小美穿的" + clothe2.type + "是" + clothe2.color + "的" + clothe2.name + "<br>");
        }
        var clothe1 = new Clothes("连衣裙", "黑色");
        var clothe2 = new Clothes("吊带裙", "黄色");
        document.write(clothe1.color + "的" + clothe1.name + "是小丽的" + clothe1.type + "<br>");
        document.write(clothe2.color + "的" + clothe2.name + "是小美的" + clothe2.type + "<br>");
        clothe2.wr_clothe();
    </script>
</body>

</html>